package judesart.app.domain;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import org.datanucleus.jpa.annotations.Extension;

@Entity
@NamedQueries(@NamedQuery(name = "ProjectArtwork.findProjectsByArtworkId", query = "select o.project from ProjectArtwork o where o.artworkId = :artworkId"))
public class ProjectArtwork implements Serializable
{

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
    private String key;
    @ManyToOne
    private Project project;
    @Basic
    private Long artworkId;
    private Long mainImageId;
    private String mainImageTitle;

    public String getKey()
    {
        return key;
    }

    public void setKey(String key)
    {
        this.key = key;
    }

    public Project getProject()
    {
        return project;
    }

    public void setProject(Project project)
    {
        this.project = project;
    }

    public Long getArtworkId()
    {
        return artworkId;
    }

    public void setArtworkId(Long artworkId)
    {
        this.artworkId = artworkId;
    }

    public Long getMainImageId()
    {
        return mainImageId;
    }

    public void setMainImageId(Long mainImageId)
    {
        this.mainImageId = mainImageId;
    }

    public String getMainImageTitle()
    {
        return mainImageTitle;
    }

    public void setMainImageTitle(String mainImageTitle)
    {
        this.mainImageTitle = mainImageTitle;
    }
}
